<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <th:block th:replace="include/css"/>
    <link rel="stylesheet" type="text/css" href="/static/css/knowledge_detail.css">
    <link rel="stylesheet" href="/static/ueditor/third-party/SyntaxHighlighter/shCoreDefault.css">
    <th:block th:replace="include/top"/>
    <title>知识库</title>
</head>
<body>
<th:block th:replace="include/header:: header"/>
<div class="main">
    <div class="navigation">
        <a href="/knowledge">知识库</a>&nbsp;&gt;&nbsp;
        <a th:href="'/knowledge/pCategoryId/'+${topic.pCategoryId}" th:text="${topic.pCategoryName}"></a>&nbsp;&gt;&nbsp;
        <a th:href="'/knowledge/categoryId/'+${topic.categoryId}" th:text="${topic.categoryName}"></a>&nbsp;&gt;&nbsp;
        <span th:text="${topic.title}"></span>
    </div>
    <div class="arc-shadow">
        <div class="topic-info-con">
            <div class="topic-icon"><a th:href="'/user/'+${topic.userId}">
                <img class="img-circle" th:src="'/static/images/'+${topic.userIcon}"></a>
            </div>
            <div class="topic-info">
                <div class="topic-title">
                    <a th:href="'/knowledge/'+${topic.topicId}" class="title" th:text="${topic.title}"></a>
                    <span class="time">fadsfsa</span>
                    <a class="topic-cate-tag" th:href="'/knowledge/categoryId/'+${topic.categoryId}"><span
                            th:text="${topic.categoryName}"></span></a>
                </div>
                <div class="topic-info-d topic-count-info">
                    <a th:href="'/user/'+${topic.userId}" class="user-info"><i class="icon icon-user-name"></i><span th:text="${topic.userName}"></span></a>
                    <span class="count"><i class="icon icon-read"></i><span>阅读：<th:block th:text="${#strings.defaultString(topic.readCount,0)}"/></span></span>
                    <span class="count"><i class="icon icon-comment" data-garbage="true"></i><span>评论：<span id="comment-count" th:text="${#strings.defaultString(topic.commentCount,0)}"></span></span></span>
                    <span class="count"><i class="icon icon-like"></i><span>喜欢：<span id="like-count" th:text="${#strings.defaultString(topic.likeCount,0)}"></span></span></span>
                    <span class="count"><i class="icon icon-collection"></i><span>收藏：<span id="collection-count" th:text="${#strings.defaultString(topic.collectionCount,0)}"></span></span></span>
                </div>
            </div>
            <div class="clear"></div>
        </div>
        <div class="topic-detail" th:utext="${topic.content}">
        </div>

        <!--<div class="attachment" th:if="${topic.attachment!=null}">
            <div class="attachment-title">附件</div>
            <div class="attachment-info">
                <span class="filename"><i class="icon icon-package"></i><th:block th:text="${topic.attachment.fileName}"/></span>&nbsp;&nbsp;
                <span>所需积分：<th:block th:text="${#strings.defaultString(topic.attachment.downloadMark,0)}"/></span>&nbsp;&nbsp;
                <span class="dccount">下载：
                    <a href="javascript:void(0)"  th:attr="attachmentid=${topic.attachment.attachmentId}"
                                            id="dcount" th:text="${#strings.defaultString(topic.attachment.downloadCount,0)}"></a></span>&nbsp;&nbsp;
                <a href="javascript:void(0)" class="btn btn-info" name="144"
                   data-th-attr="topicid=${topic.topicId},attachmentid=${topic.attachment.attachmentId}" id="downloadFile">点击下载</a>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <a href="/donate" target="_blank">没有积分？</a>
            </div>
            <div class="clear"></div>
        </div>-->

        <th:block th:replace="include/comment"/>

    </div>
</div>

<th:block th:replace="include/footer:: footer"/>
<script type="text/javascript" src="/static/ueditor/third-party/SyntaxHighlighter/shCore.js"></script>
<script type="text/javascript">
    SyntaxHighlighter.all();
</script>
<script th:inline="javascript">
    fzqblog.topicId = [[${topic.topicId}]];
    fzqblog.articleType = "K";
    fzqblog.articleTitle = [[${topic.title}]];
    fzqblog.articleUserId = [[${topic.userId}]];
</script>
<script type="text/javascript" charset="utf-8" src="/static/js/knowledge_detail.js"></script>
</body>
</html>